package acm.广度优先搜索;

import java.util.Scanner;

public class J {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while (sc.hasNext()) {
            int s= sc.nextInt();
            int[] cups={sc.nextInt(),sc.nextInt()};
            int res=-1;
            if (s%2!=0||(res=fun(cups,0,s/2))<0){
                System.out.println("NO");
            }else {
                System.out.println(res);
            }
        }
    }
    static {
        int[]cups={5,3};
        System.out.println(fun(cups, 0, 4));
    }

    /**
     * 有index个选择，剩下rest的水时使用的最小次数
     */
    public static int fun(int[] cups,int index,int rest){
        if (rest==0){
            return 0;
        }
        if (index>=cups.length||rest<0){
            return -1;
        }
        int min=Integer.MAX_VALUE;
        int minCount=0;
        int i = 0;
        for (; cups[index]*i <= rest; i++) {
            int count = fun(cups, index + 1, rest - cups[index] * i);
            if (count>=0&&min>count){
                min=count;
                minCount=i;
            }
        }
        return min+minCount;
    }
    static {
//        compare();
    }

    public static void compare(){
        int count=10000;
        while (count-- > 0) {
            int s= (int) (Math.random()*10+1)*2;
            int n= (int) (Math.random()*s);
            int m=s-n;
            int[] cups={n,m};
            int res = fun(cups, 0, s / 2);
            System.out.println("s->"+s+"\tn->"+n+"\tm->"+m+"\tres="+res);
        }
    }
}
